package com.appspot.entourage.graphtools;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;


public class TestGraphML {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		List<GraphNode> gn = new ArrayList<GraphNode>();
		List<GraphEdge> ed = new ArrayList<GraphEdge>();
		for(int i=0; i<10; i++)
		{
			gn.add(new GraphNode(Integer.toString(i), "name"+i, "surname"+i));
		}

		Random generator = new Random();
		
		for(int i=0; i<10; i++)
		{
			int n1 = generator.nextInt(5);
			int n2 = generator.nextInt(5)+5;
			int connections = generator.nextInt(9);
			ed.add(new GraphEdge(gn.get(n1), gn.get(n2), connections));
		}
		
		System.out.print(GraphMLConverter.createGraph(gn, ed));
	}

}
